import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import( /* webpackChunkName: "home" */ '@/views/Home.vue'),
    meta: {
      title: '首页',
      keepAlive: false,
      hiddenHeader: true
    }
  },

  {
    path: '/airport',
    name: 'Airport',
    component: () => import( /* webpackChunkName: "home" */ '@/views/Airport.vue'),
    meta: {
      title: '机场',
      keepAlive: false,
      hiddenHeader: true
    }
  },

  {
    path: '/hospital',
    name: 'Hospital',
    component: () => import( /* webpackChunkName: "home" */ '@/views/Hospital.vue'),
    meta: {
      title: '医院',
      keepAlive: false,
      hiddenHeader: true
    }
  },

  {
    path: '/school',
    name: 'School',
    component: () => import( /* webpackChunkName: "home" */ '@/views/School.vue'),
    meta: {
      title: '学校',
      keepAlive: false,
      hiddenHeader: true
    }
  },

  {
    path: '/center',
    name: 'Center',
    component: () => import( /* webpackChunkName: "home" */ '@/views/Center.vue'),
    meta: {
      title: '中心场景',
      keepAlive: false,
      hiddenHeader: true
    }
  }
]

const router = new VueRouter({
  routes,
  // scrollBehavior: () => ({
  //   y: 0
  // })
})

export default router
